Skip to content

fix(toolchain): aggregate identical short-ID definitions and ignore empty system scan roots - #228

Merged
xiaoyumuxi merged 2 commits into
mainfrom
fix/toolchain-shared-short-id-and-empty-scan
Nov 29, 2026
Merged

xiaoyumuxi merged 2 commits into
mainfrom
fix/toolchain-shared-short-id-and-empty-scan

Conversation

@xiaoyumuxi

@xiaoyumuxi xiaoyumuxi commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

摘要

关联桌面端 PR:1lck/Lithe-IDEA#2526(Draft)
关联 AI 插件 PR:Lithe-IDEA/lithe-ai-plugins#8(Draft)

  1. 相同工具短 ID 自动聚合(toolchains.registry / toolchains.discoveryPlan)

    • 多个已启用插件声明同一个工具短 ID(如共享运行时的包管理器/构建工具)且规范化定义(kind、category、displayName、scope、executableLayouts、discovery、probe、priority)完全一致时,自动聚合成一条共享工具定义,并以排序后的首个插件 ID 作为 pluginID,多插件声明时额外返回排序后的 pluginIDs;
    • 若规范化定义存在任意差异,仍按原有冲突规则以 conflicts 拒绝并跳过自动解析,不提升 toolDefinitions 能力版本。
  2. 空的已观测系统扫描目录不误报 unsafePath

    • 当宿主的 host:system 自动发现或无 provider 的外部目录校验检查到某个已存在的根目录(如存在但无目标工具的 ~/.local)时,若当前平台适用的全部 executableLayouts 均明确观测为 missing,则返回 notFound 而非 unsafePath;
    • host:system 自动扫描结果遇到 notFound 时直接跳过,避免无目标工具的候选目录覆盖正常检测结果或误报“路径不安全或超出允许目录”;
    • provider 上报路径校验(checked_installation)、未观测的目录、路径越界/符号链接逃逸以及存在但非可执行的文件仍保持 unsafePath / UNSAFE。

契约与文档

  • 更新 shared/plugins/contract/v1/toolchains/README.md 说明共享短 ID 的聚合规则与 pluginIDs 字段。
  • 更新 shared/plugins/reference/protocol-changelog.md。

验证

  • cargo fmt --manifest-path rust/Cargo.toml --check
  • cargo test --manifest-path rust/Cargo.toml -p lithe-toolchain -p lithe-core toolchain(112 passed, 0 failed)
  • cargo test --manifest-path rust/Cargo.toml -p lithe-toolchain -p lithe-plugin-manifest
  • cargo clippy --manifest-path rust/Cargo.toml -p lithe-toolchain -p lithe-core --all-targets -- -D warnings
  • scripts/rust-core/verify-rust-core-comments.sh toolchain
  • node scripts/rust-core/verify-platform-tests.mjs
  • node shared/plugins/scripts/verify-docs.mjs

@xiaoyumuxi
xiaoyumuxi marked this pull request as ready for review November 29, 2026 12:05
@xiaoyumuxi
xiaoyumuxi merged commit d426f01 into main Nov 29, 2026
7 of 9 checks passed

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Devin Review: 3 flags

Not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)

Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant